package com.qhs.task;

import com.qhs.framework.utils.DateUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Created by xinchao on 2017/5/16 0016.
 */
@Component
public class ScheduledTasks {

    private static final Logger logger = LoggerFactory.getLogger(ScheduledTasks.class);

    /**
     * 下午5点向高于200未发货的店员短信提醒 发货
     */
     @Scheduled(cron="0 0 17 * * ?")
    public void executeFileDownLoadTask() {

         if(ScheduledConfig.smsPush == true){
             Thread current = Thread.currentThread();
             logger.info("开始执行门店是否已满200元，向订单店员发出短信提醒:"+current.getId()+ ",name:"+current.getName()+ ",time:"+ DateUtil.getSNowDateTime());
           /*  try {
                 empService.batchStoreOrderAmount();
             } catch (BusinessException e) {
                 e.getMsg();
             }*/
             logger.info("结束执行门店是否已满200元，向订单店员发出短信提醒:"+current.getId()+ ",name:"+current.getName()+ ",time:"+ DateUtil.getSNowDateTime());
         }
    }



}
